package com.csi.bumblebee.mapper;

import com.csi.bumblebee.domain.dictionary.MyLocation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 城市地理位置字典表
 * @author wdl yeebs(查询全部地理位置)
 */
@Mapper
public interface MyLocationMapper {

    //查询一级城市分类
    List<MyLocation> listLocationOne();

    //查询二级城市分类
    List<MyLocation> listLocationTwo();

    //查询一级城市分类下的二级城区分类
    List<MyLocation> listLocationSon(String id);

    /**
     * 查询全部地理位置
     * @return MyLocation集合
     */
    List<MyLocation> listLocationTree();

    /**
     * 根据父id查询全部location
     * @param fatherId 父id
     * @return MyLocation集合
     */
    List<MyLocation> findByFather(@Param("fatherId") String fatherId);

}
